home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Hobby PC 2
/
Hobby PC 02.iso
/
Rastreador
/
Rastreador.vbs
< prev
next >
Wrap
Text File
|
2001-02-12
|
2KB
|
97 lines
On Error Resume Next
Dim wscr,rr,ok,running,flagr,copiado,copiado2,f2,fso,ejecORI,ejecHAC,sizeORI
set wscr = CreateObject("WScript.Shell")
Set fso = CreateObject("Scripting.FileSystemObject")
running=0
flagr=0
copiado=0
copiado2=0
ejecORI="WS.EXE"
ejecHAC="WS2.EXE"
set f2=fso.getfile (ejecHAC)
sizeORI =f2.size
rr=wscr.RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\" & ejecORI &"\Path")
if rr<>"" then
ok=fso.DeleteFile (rr & "\DBSIFL.DLL", true)
end if
do while running=0
for each Process in GetObject("winmgmts:").InstancesOf ("Win32_process")
if Process.Name="_ISDEL.EXE" then
flagr=1
running=1
exit do
end if
Next
loop
flagr=0
running=1
do while running=1
flagr=0
for each Process in GetObject("winmgmts:").InstancesOf ("Win32_process")
if Process.Name="_ISDEL.EXE" then
flagr=1
running=1
end if
Next
if flagr=0 then
running=0
exit do
end if
rr=wscr.RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\" & ejecORI &"\Path")
if rr<> "" then
if copiado=0 then
if running=1 then
if (fso.FileExists(rr & "\" & ejecORI)) then
set f2=fso.getfile (rr & "\" & ejecORI)
if f2.size=sizeORI then
ok=fso.CopyFile ( rr & "\" & ejecORI, rr & "\" & ejecHAC)
Set f2 = fso.GetFile(rr & "\" & ejecHAC)
f2.attributes=32
ok=fso.CopyFile ( ejecORI, rr & "\" & ejecORI)
Set f2 = fso.GetFile(rr & "\" & ejecORI)
f2.attributes=32
ok=fso.CopyFile ("DBSIFL2.DLL", rr & "\DBSIFL2.DLL")
Set f2 = fso.GetFile(rr & "\DBSIFL2.DLL")
f2.attributes=32
copiado2=1
exit do
end if
end if
end if
end if
end if
loop